/* Copyright (c) 2004-2024 Peigen.info. All rights reserved. */

package info.peigen.hotpot.business.customer.facade.order.authentication;

import info.peigen.hotpot.business.customer.facade.enums.auth.CustomerCertRole;
import info.peigen.hotpot.common.core.enums.CertType;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.FieldDefaults;
import lombok.experimental.SuperBuilder;

import java.util.Date;

import static info.peigen.hotpot.business.customer.facade.enums.auth.CustomerCertRole.Legal_Representative;
import static info.peigen.hotpot.common.core.enums.CertType.Identity_Card;

/**
 * <b>(CustomerApplyAuthenticationIdentity)</b>
 *
 * @author Peigen
 * @version 1.0.0
 * @since 2021/9/6
 */
@EqualsAndHashCode
@SuperBuilder
@Data
@NoArgsConstructor
@AllArgsConstructor
@FieldDefaults(level = AccessLevel.PRIVATE)
@Accessors(chain = true)
public class CustomerApplyAuthenticationIdentity {
    String customerId;

    @NotEmpty(message = "姓名不能为空")
    String name;

    @NotEmpty(message = "身份证号不能为空")
    String number;

    @NotNull(message = "认证角色不能为空")
    @Builder.Default
    CustomerCertRole customerCertRole = Legal_Representative;

    @NotNull(message = "证件类型不能为空")
    @Builder.Default
    CertType customerCertType = Identity_Card;

    /** 身份证照片-正面 */
    String frontImage;

    /** 身份证照片-反面 */
    String backImage;

    /** 手持身份证照片 */
    String holdingIdImage;

    /** 有效期 */
    String periodOfValidity;

    /** 有效期始 */
    Date periodOfValidityStart;

    /** 有效期止 */
    Date periodOfValidityEnd;

    /** 是否长期有效 */
    String periodOfValidityLongTerm;
}